Optimal. Leaf size=63 \[ -\frac {2 a^3 \tan (c+d x)}{d}-\frac {4 i a^3 \log (\cos (c+d x))}{d}+4 a^3 x+\frac {i a (a+i a \tan (c+d x))^2}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3478, 3477, 3475} \[ -\frac {2 a^3 \tan (c+d x)}{d}-\frac {4 i a^3 \log (\cos (c+d x))}{d}+4 a^3 x+\frac {i a (a+i a \tan (c+d x))^2}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3475
Rule 3477
Rule 3478
Rubi steps
\begin {align*} \int (a+i a \tan (c+d x))^3 \, dx &=\frac {i a (a+i a \tan (c+d x))^2}{2 d}+(2 a) \int (a+i a \tan (c+d x))^2 \, dx\\ &=4 a^3 x-\frac {2 a^3 \tan (c+d x)}{d}+\frac {i a (a+i a \tan (c+d x))^2}{2 d}+\left (4 i a^3\right ) \int \tan (c+d x) \, dx\\ &=4 a^3 x-\frac {4 i a^3 \log (\cos (c+d x))}{d}-\frac {2 a^3 \tan (c+d x)}{d}+\frac {i a (a+i a \tan (c+d x))^2}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.04, size = 119, normalized size = 1.89 \[ \frac {a^3 \sec (c) \sec ^2(c+d x) \left (-3 \sin (c+2 d x)+2 d x \cos (3 c+2 d x)-i \cos (3 c+2 d x) \log \left (\cos ^2(c+d x)\right )+\cos (c+2 d x) \left (2 d x-i \log \left (\cos ^2(c+d x)\right )\right )+\cos (c) \left (-2 i \log \left (\cos ^2(c+d x)\right )+4 d x-i\right )+3 \sin (c)\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 95, normalized size = 1.51 \[ \frac {-8 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - 6 i \, a^{3} + {\left (-4 i \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} - 8 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - 4 i \, a^{3}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )}{d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.66, size = 117, normalized size = 1.86 \[ \frac {-4 i \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 8 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 8 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - 4 i \, a^{3} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 6 i \, a^{3}}{d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 68, normalized size = 1.08 \[ -\frac {3 a^{3} \tan \left (d x +c \right )}{d}-\frac {i a^{3} \left (\tan ^{2}\left (d x +c \right )\right )}{2 d}+\frac {2 i a^{3} \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{d}+\frac {4 a^{3} \arctan \left (\tan \left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.68, size = 76, normalized size = 1.21 \[ a^{3} x + \frac {3 \, {\left (d x + c - \tan \left (d x + c\right )\right )} a^{3}}{d} + \frac {i \, a^{3} {\left (\frac {1}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right )^{2} - 1\right )\right )}}{2 \, d} + \frac {3 i \, a^{3} \log \left (\sec \left (d x + c\right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.28, size = 41, normalized size = 0.65 \[ -\frac {a^3\,\left (6\,\mathrm {tan}\left (c+d\,x\right )-\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,8{}\mathrm {i}+{\mathrm {tan}\left (c+d\,x\right )}^2\,1{}\mathrm {i}\right )}{2\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.31, size = 94, normalized size = 1.49 \[ - \frac {4 i a^{3} \log {\left (e^{2 i d x} + e^{- 2 i c} \right )}}{d} + \frac {8 a^{3} e^{2 i c} e^{2 i d x} + 6 a^{3}}{i d e^{4 i c} e^{4 i d x} + 2 i d e^{2 i c} e^{2 i d x} + i d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________